home *** CD-ROM | disk | FTP | other *** search
/ Aminet 50 / Aminet 50 (2002)(GTI - Schatztruhe)[!][Aug 2002].iso / Aminet / util / rexx / Pixload-1.74.lha / Pixload-1.74 / Pixload < prev    next >
Text File  |  2002-06-15  |  3KB  |  128 lines

  1. /**/
  2.  
  3. call init
  4. call CreateApp(f)
  5. call HandleApp
  6.  
  7. /*never reached */
  8. /**********************************************************************/
  9. init: procedure expose global.
  10.  
  11.     l="rmh.library";if ~show("L",l) then;if ~addlib(l,0,-30) then exit
  12.     if AddLibrary("rxmui.library")~=0 then exit
  13.     call rxmuiopt("debugmode showerr")
  14.     return
  15. /***********************************************************************/
  16. HandleApp: procedure expose prog.
  17.  
  18.     ctrl_c=2**12
  19.     do forever
  20.         call NewHandle("app","h",ctrl_c)
  21.         if and(h.signals,ctrl_c)>0 then exit
  22.         select
  23.             when h.event="QUIT" then exit
  24.             otherwise interpret h.event
  25.         end
  26.     end
  27. /* never reached */
  28. /***********************************************************************/
  29. CreateApp: procedure expose prog.
  30.  
  31.  
  32.     open(chemin,"Pixload:Prefs/Pixload.prefs",'Read')
  33.  
  34.     num=0
  35.     icones=readln(chemin)
  36.     icones=icones-1
  37.     large=readln(chemin)
  38.  
  39.     do while ~EOF(chemin)
  40.  
  41.            script=readln(chemin)
  42.            fichier=readln(chemin)
  43.  
  44.     if fichier~="" then do
  45.  
  46.        if script~==1 then prog.num="address command 'wbrun "||fichier||"'"
  47.        else prog.num="address command 'execute "||fichier||"'"
  48.  
  49.     end
  50.  
  51.        bull=readln(chemin)
  52.  
  53.        if bull~="" then bulle.num=bull
  54.        else bulle.num="???"
  55.  
  56.        num=num+1
  57.  
  58.     end
  59.  
  60.     call close(chemin)
  61.  
  62.     app.Title="Pixload"
  63.     app.Version="$VER: Pixload version 1.74"
  64.     app.Author="Pixel Art - www.Pixel-Art.fr.st"
  65.     app.Description="Programs loading bar"
  66.     app.SubWindow="win"
  67.     app.Base="Pixload"
  68.  
  69.      win.Class="BWin"
  70.      win.nosize=1
  71.  
  72.      win.ID="MAIN"
  73.  
  74.      win.Contents="mgroup"
  75.  
  76.      mgroup.0="speedbar"
  77.  
  78.          speedbar.class="speedbar"
  79.          speedbar.horiz=large
  80.          speedbar.RaisingFrame=1
  81.          speedbar.Borderless=1
  82.          speedbar.viewmode="GFX"
  83.          speedbar.imagesdrawer="Pixload:icones"
  84.          speedbar.sunny=1
  85.  
  86.          do i=0 to icones
  87.  
  88.             speedbar.i.Img=i
  89.             speedbar.i.Help=bulle.i
  90.  
  91.          end
  92.  
  93.       if NewObj("application","app")>0 then exit
  94.  
  95.       do i=0 to icones
  96.          call sbNotify("speedbar",i,"pressed",1,"app","Return","call dofun("i")")
  97.       end
  98.  
  99.     call domethod("win","adduseritem","Pixload's Prefs",1)
  100.     call notify("win","useritem",1,"app","return","call prefs")
  101.  
  102.     call Notify("win","CloseRequest",1,"APP","ReturnID","quit")
  103.  
  104.     call set("win","open",1)
  105.  
  106.  
  107. return
  108. /* --------------------------------------------*/
  109. prefs: procedure
  110.  
  111.         cmd="address command 'wbrun sys:prefs/pixload-prefs'"
  112.     interpret cmd
  113.  
  114. return
  115. /* ------------------------- */
  116. dofun: procedure expose prog.
  117.  
  118.     parse arg a
  119.  
  120.     cmd=prog.a
  121.     interpret cmd
  122.  
  123. return
  124. /* ---*/
  125. halt:
  126.     break=_c:
  127.     exit
  128.